import { defineConfig } from 'vite'
import { join } from 'path'
import vue from '@vitejs/plugin-vue'
import prismjs from 'vite-plugin-prismjs';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue(), prismjs({languages: 'all',})],
  resolve: {
    alias: {
      '@': join(__dirname, 'src'),
    }
  },
  server: {
    proxy: {
      '/api': {
        target: 'https://api.worldol.life',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, ""),
      },
    }
  }
})
